#include "mqserver61850.h"
#include "main.h"

MQServer61850::MQServer61850()
{
    m_threadRunningFlag = true;
    main_init();
    start();
}

MQServer61850::~MQServer61850()
{
    m_threadRunningFlag = false;
    sleep(1);
    main_destory();
}

int MQServer61850::getConnectNum()
{
    return main_getConnectNum();
}

void MQServer61850::run()
{
    while (m_threadRunningFlag) {
        main_loop();
        msleep(100);
    }
}
